package com.bluefish.bltuan.tools;

import java.util.Random;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public final class Util {
	
	private static final String NUMBER_REGEX = "[0-9]*";
	private static final int RANDOM_SEED = 999999999;

	private Util(){
	    
	}
	
	public static String getRandomNumber(){
		Random random = new Random();
		return String.valueOf(random.nextInt(RANDOM_SEED));
	}
	
	public static boolean isNumeric(String str)
	{
		Pattern pattern = Pattern.compile(NUMBER_REGEX);
		Matcher isNum = pattern.matcher(str);
		return isNum.matches();
	}
}
